<script>
 

function $(id){ return document.getElementById(id); }
function log(msg){ $("log").innerHTML+="<br>"+msg; } 
function init()
{
//  var msg='{"fromuser","server":"content":"jjj:","state": 1}';
// // log(msg);
//  var serverinfo=eval("("+msg+")");
//  alert(serverinfo)
//  log(serverinfo.fromuser);
//  
	 // var myTest='{"fromuser":"server","content":"content","state":1}'; 
	 // myTest = myTest.substr(0,(myTest.length-5));
	 // alert(myTest);
	 // log(myTest);
	//var json = JSON.parse(myTest);
//	alert(json['fromuser']);
   // oTest=eval('('+myTest+')'); 
   // alert(oTest.fromuser+","+oTest.content); 
 	// log(oTest.ontent);
 	// slt=document.getElementById("senduser");
 	//  var touser=options[slt.selectedIndex].value;
 	//  alert(touser);
 /*	var obj = document.getElementById("senduser"); //selectid
 
var index = obj.selectedIndex; // 选中索引
 
var text = obj.options[index].text; // 选中文本
 
var value = obj.options[index].value; // 选中值
alert(text);
alert(value);*/
var a=[];
a[0]="aa";
a[1]="ds";
a.push("ds");
a.splice(1,1);
alert(a);
 var slt=document.getElementById("senduser");
  slt.options.length=0;

}
</script>
<body onload="init()">
 <div id="log"></div>
 <select id="senduser">
 	<option value="1">kk</option>
 	<option value="2">all</option>
 
</select>